<%--
  Created by IntelliJ IDEA.
  User: 29379
  Date: 2022/4/25
  Time: 8:36
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>修改文章</title>
</head>
<script src="js/jquery-1.8.3.min.js"></script>
<script src="js/jquery-1.11.2.js"></script>
<script>
   $(function (){
       $.post("all","",function (list) {
           for (var i=0;i<list.length;i++){
               $("#div1").append("" +
                   " <img src=\"img/yuanchuangwenzhang.png\"></span>\n" +
                   "                            <a class=\"base_list_box_title_a\" onclick='watch("+list[i].id+")' href=\"wenzhang.html?title="+list[i].title+"&matter="+list[i].matter+"\" title=\"这里是文章title\">"+list[i].title+"</a>\n" +
                   "                        </div><div><a href='modefiaction2.jsp?id="+list[i].id+"'>修改该篇文章</a>   <button onclick='delete1("+list[i].id+")'>删除该篇文章</button></div>")

           }
   })})
   function delete1(id){

        $.post(
            "delete","id="+id,function (pd){
                alert(123)
/*
                window.location.href="forward:http://localhost:8080/web_war_exploded/modefiacion.jsp";
*/
            },"json"
        )
   }
</script>
<style>
    #div1{
        width: 100%;
        height: 100%;
    }
</style>
<body>
    <div id="div1"></div>
</body>
</html>
